export interface responseData {
  code: number;
  message: string;
  ok: boolean;
}

//单个菜单权限的类型
export interface Permission {
  id: number;
  createTime: string;
  updateTime: string;
  pid: number;
  name: string;
  code: null;
  toCode: null;
  type: number;
  status: null;
  level: number;
  children?: PermissionList;
  select: boolean;
}
//菜单权限数组
export type PermissionList = Permission[];

//获取全部菜单与按钮的接口返回数据
export interface PermissionData extends responseData {
  data: PermissionList;
}

//新增或更新菜单的参数
export interface MenuParams {
  id?: number;
  code: string;
  level: number;
  name: string;
  pid: number;
}
